﻿using System;

namespace Sunyi.Project.WebPoint.DataContract
{
    public partial class Page : IComparable
    {
        public int CompareTo(object obj)
        {
            var antherPage = obj as Page;

            if (antherPage != null)
            {
                return this.NavigationOrder.CompareTo(antherPage.NavigationOrder);
            }
            else
            {
                throw new InvalidOperationException();
            }
        }
    }
}
